<template>
	 <view class="content">
	    <view class="header">首页头部</view>
		<button type="primary" size="mini" @click="goToGoodsList">到商品列表</button>
		<!-- 内置组件 -->
		    <swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" :circular="true">
		      <swiper-item>
		        <image src="/static/uploads/1.png" mode=""></image>
		      </swiper-item>
		      <swiper-item>
		        <image src="/static/uploads/2.png" mode=""></image>
		      </swiper-item>
		      <swiper-item>
		        <image src="/static/uploads/3.png" mode=""></image>
		      </swiper-item>
		      <swiper-item>
		        <image src="/static/uploads/4.png" mode=""></image>
		      </swiper-item>
		    </swiper>
		
		    <switch checked="true" />
		
		    <!-- 使用扩展组件 -->
		    <uni-countdown :day="1" :hour="1" :minute="12" :second="40"></uni-countdown>
	  </view>
</template>

<script lang="ts" setup>
	const goToGoodsList = () => {
	    uni.navigateTo({
	      url: '/subpkg_goods/pages/list/list'
	    })
	  }
</script>

<style lang="scss" scoped>
	.content {
	width: 100vw;
	height: 100vh;
	
	.header {
		width: 200rpx;
		height: 200rpx;
		background-color: #9e7cff;
	   }
}
swiper {
    width: 750rpx;
    height: 400rpx;
  }

  swiper image {
    width: 100%;
    height: 100%;
  }
</style>
